package entity;

import java.io.Serializable;

/**
 * 功能: 个人信息实体类
 *
 * @author 任禹名
 */
public class ChessUser implements Serializable {
    private String name;    // 姓名
    private String fileName;  // 头像路径


    public ChessUser(String name, String fileName) {
        this.name = name;
        this.fileName = fileName;
    }

    public ChessUser(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        ChessUser chessUser = (ChessUser) obj;
        if (getName().equals(chessUser.getName())) return true;
        return false;
    }
}
